package com.ruoyi.project.tool.swagger.UserController;

import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.system.domain.SysConfig;
import com.ruoyi.project.system.service.ISysConfigService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.List;

/**
 * 参数配置 信息操作处理
 *
 * @author ruoyi
 */
@RestController
@Api(tags = "参数配置")
@RequestMapping("/mobileUser/config")
public class UserConfigController extends BaseController {
    @Autowired
    private ISysConfigService configService;

    /**
     * 根据参数键名查询参数值
     */
    @ApiOperation("查询手机号邮箱")
    @GetMapping(value = "/configKey")
    public AjaxResult getConfigKey() {
        String phone = "phone";
        String email = "email";
        Object phoneObject = configService.selectConfigKey(phone);
        Object emailObject = configService.selectConfigKey(email);
        HashMap<String, Object> map = new HashMap();
        map.put("phone", phoneObject);
        map.put("email", emailObject);
        return AjaxResult.success(map);
    }

}
